load("@rules_go//go:def.bzl", "go_library", "go_test")

go_test(
    name = "govulncheck_test",
    size = "large",
    srcs = ["govulncheck_test.go"],
    data = [
        "testdata/ignored.json",
        "//:MODULE.bazel",
        "@rules_go//go",
    ],
    embed = [":govulncheck"],
    tags = [
        "external",
        "manual",
        "no-cache",
        "no-sandbox",
    ],
    deps = [
        "//src/internal/errors",
        "//src/internal/log",
        "//src/internal/pctx",
        "@com_github_google_go_cmp//cmp",
        "@org_golang_x_exp//maps",
        "@org_golang_x_vuln//scan",
    ],
)

go_library(
    name = "govulncheck",
    srcs = ["govulncheck.go"],
    importpath = "github.com/pachyderm/pachyderm/v2/src/testing/govulncheck",
    visibility = ["//visibility:public"],
    deps = ["@rules_go//go/runfiles:go_default_library"],
)
